package com.ruoyi.swla2.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 告警策略对象 dm_warn_strategy
 *
 * @author gdqt
 * @date 2023-06-16
 */
public class WarnStrategy extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 平台自增主键
     */
    private Long ID;

    /**
     * 所属租户ID
     */
    @Excel(name = "所属租户ID")
    private String tenantId;

    /**
     * 策略名称
     */
    @Excel(name = "策略名称")
    private String StrategyName;

    /**
     * 报警目标类型，对应自定义字典表WarnTargetType
     */
    @Excel(name = "报警目标类型，对应自定义字典表WarnTargetType")
    private String TargetType;

    /**
     * 报警参数类型，对应自定义字典表WarnParamType
     */
    @Excel(name = "报警参数类型，对应自定义字典表WarnParamType")
    private String ParamType;

    /**
     * 是否通用，0：否，1：是，默认1
     */
    @Excel(name = "是否通用，0：否，1：是，默认1")
    private Integer IsGeneral;

    /**
     * 层级ID，不通用时必填，通用时必不填
     */
    @Excel(name = "层级ID，不通用时必填，通用时必不填")
    private String TargetId;

    private String targetName;

    /**
     * 起始日期
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "起始日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date StartDate;

    /**
     * 截止日期
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "截止日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date EndDate;

    /**
     * 起始时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "起始时间", width = 30, dateFormat = "HH:mm:ss")
    private Date StartTime;

    /**
     * 截止时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "截止时间", width = 30, dateFormat = "HH:mm:ss")
    private Date EndTime;

    /**
     * 一级上限限制值（正常区间）
     */
    @Excel(name = "一级上限限制值", readConverterExp = "正=常区间")
    private BigDecimal Level1Up;

    /**
     * 一级下限限制值（正常区间）
     */
    @Excel(name = "一级下限限制值", readConverterExp = "正=常区间")
    private BigDecimal Level1Down;

    /**
     * 二级上限限制值
     */
    @Excel(name = "二级上限限制值")
    private BigDecimal Level2Up;

    /**
     * 三级上限限制值
     */
    @Excel(name = "三级上限限制值")
    private BigDecimal Level3Up;

    /**
     * 是否启用，0：否，1：是，默认1
     */
    @Excel(name = "是否启用，0：否，1：是，默认1")
    private Integer Enable;

    /**
     * 备注
     */
    @Excel(name = "备注")
    private String Remark;

    public Long getID() {
        return ID;
    }

    public void setID(Long ID) {
        this.ID = ID;
    }

    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    public String getStrategyName() {
        return StrategyName;
    }

    public void setStrategyName(String strategyName) {
        StrategyName = strategyName;
    }

    public String getTargetType() {
        return TargetType;
    }

    public void setTargetType(String targetType) {
        TargetType = targetType;
    }

    public String getParamType() {
        return ParamType;
    }

    public void setParamType(String paramType) {
        ParamType = paramType;
    }

    public Integer getIsGeneral() {
        return IsGeneral;
    }

    public void setIsGeneral(Integer isGeneral) {
        IsGeneral = isGeneral;
    }

    public String getTargetId() {
        return TargetId;
    }

    public void setTargetId(String targetId) {
        TargetId = targetId;
    }

    public String getTargetName() {
        return targetName;
    }

    public void setTargetName(String targetName) {
        this.targetName = targetName;
    }

    public Date getStartDate() {
        return StartDate;
    }

    public void setStartDate(Date startDate) {
        StartDate = startDate;
    }

    public Date getEndDate() {
        return EndDate;
    }

    public void setEndDate(Date endDate) {
        EndDate = endDate;
    }

    public Date getStartTime() {
        return StartTime;
    }

    public void setStartTime(Date startTime) {
        StartTime = startTime;
    }

    public Date getEndTime() {
        return EndTime;
    }

    public void setEndTime(Date endTime) {
        EndTime = endTime;
    }

    public BigDecimal getLevel1Up() {
        return Level1Up;
    }

    public void setLevel1Up(BigDecimal level1Up) {
        Level1Up = level1Up;
    }

    public BigDecimal getLevel1Down() {
        return Level1Down;
    }

    public void setLevel1Down(BigDecimal level1Down) {
        Level1Down = level1Down;
    }

    public BigDecimal getLevel2Up() {
        return Level2Up;
    }

    public void setLevel2Up(BigDecimal level2Up) {
        Level2Up = level2Up;
    }

    public BigDecimal getLevel3Up() {
        return Level3Up;
    }

    public void setLevel3Up(BigDecimal level3Up) {
        Level3Up = level3Up;
    }

    public Integer getEnable() {
        return Enable;
    }

    public void setEnable(Integer enable) {
        Enable = enable;
    }

    @Override
    public String getRemark() {
        return Remark;
    }

    @Override
    public void setRemark(String remark) {
        Remark = remark;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("ID", getID())
                .append("tenantId", getTenantId())
                .append("StrategyName", getStrategyName())
                .append("TargetType", getTargetType())
                .append("ParamType", getParamType())
                .append("IsGeneral", getIsGeneral())
                .append("TargetId", getTargetId())
                .append("StartDate", getStartDate())
                .append("EndDate", getEndDate())
                .append("StartTime", getStartTime())
                .append("EndTime", getEndTime())
                .append("Level1Up", getLevel1Up())
                .append("Level1Down", getLevel1Down())
                .append("Level2Up", getLevel2Up())
                .append("Level3Up", getLevel3Up())
                .append("Enable", getEnable())
                .append("Remark", getRemark())
                .toString();
    }
}
